class Animal {
  private name: string;
  constructor(theName: string) {
    this.name = theName;
  }

  public getName(): string {
    return this.name;
  }
}

interface DogImp extends Animal {
  sayHello(): void;
}

class Dog extends Animal implements DogImp {
  constructor(name: string) {
    super(name);
  }

  public sayHello() {
    console.log("Hello Dog");
  }
}
const dog: Dog = new Dog("Wang Cai");
console.log(dog.getName());
dog.sayHello();
console.log(dog);
